package org.testis.webautomationmodule.services;

import org.testis.services.AtofModuleService;


/**
 *Defines a  class for automation web based test steps
 * @author nurhat
 */
public abstract class WebAutomationModuleProviderService extends AtofModuleService
{

    /**
     * Used to define web automation provider implementation. e.g Selenium 
     */
    protected WebAutomationProviderImpl m_automationImpl;


    public WebAutomationModuleProviderService(WebAutomationProviderImpl automationImpl)
    {
        setAutomate(automationImpl);
    }


    public WebAutomationProviderImpl getAutomate()
    {
        return m_automationImpl;
    }


    public void setAutomate(WebAutomationProviderImpl automate)
    {
        this.m_automationImpl = automate;

    }


    /**
     * opens a window  before running test step
     * @return
     */
    public abstract boolean openWindow() throws Exception;


    /**
     * starts automation implementation   before running test step
     * e.g.  start selenium server, start selenium rc
     * @throws java.lang.Exception
     */
    public abstract void startAutomation() throws Exception;


    /**
     * After executing test step , stops automation implementation  
     *  * e.g.  stop selenium server, stop selenium rc
     */
    public abstract void stopAutomation();
}
